#pragma once

#include <vector>

using std::vector;

struct InternalUser
{
   size_t ullNameHash;
   size_t ullPassHash;

   bool operator==(const InternalUser &sRHS) const
   {
      return (sRHS.ullNameHash == this->ullNameHash);
   }
   bool operator!=(const InternalUser &sRHS) const
   {
      return (sRHS.ullNameHash != this->ullNameHash);
   }
};

class CUserList
{
protected:
   vector<InternalUser> m_sVecUserList;

public:
   CUserList();
   ~CUserList();
   void LoadUsersFromFile(char *szFileName, size_t ullSize);
   void SaveUsersToFile(char *szFileName, size_t ullSize);
   bool UserExists(char *szUserName, size_t ullUNSize);
   void AddUser(char *szUserName, size_t ullUNSize);
   void SetPass(char *szUserName, size_t ullUNSize, char *szPass, size_t ullPWSize);
   void RemoveUser(char *szUserName, size_t ullUNSize);
   bool ValidateUser(char *szUserName, size_t ullUNSize, char *szPass, size_t ullPWSize);
   void ClearUsers();
};